<CFSETTING enablecfoutputonly="true">
<CFCOMPONENT extends="ColdRails.View.ViewBase" output="true">
	
	<CFFUNCTION name="render" access="public" output="true" returntype="void">
		
		<CFSWITCH expression="#variables.mimeType#">
			<CFCASE value="text/html">
				<cfset renderHtml()>
			</CFCASE>
			<CFDEFAULTCASE>
				<cfset renderDefault()>
			</CFDEFAULTCASE>
		</CFSWITCH>
		
	</CFFUNCTION>
	
	<CFFUNCTION name="renderHtml" access="private" returntype="void">
		<cfset var template = CreateObject("Component", Application.appStrub & ".view.template." & variables.layout).init()>
		<CFOUTPUT>#template.getHead()#</CFOUTPUT>
		<CFOUTPUT>#this[variables.container]()#</CFOUTPUT>
		<CFOUTPUT>#template.getFoot()#</CFOUTPUT>
		<CFHTMLHEAD text="#getCSSlink()#">
		<CFHTMLHEAD text="#getScriptlink()#">
		<CFHTMLHEAD text="#getScriptInit()#">
	</CFFUNCTION>
	
	<CFFUNCTION name="renderDefault" access="private" returntype="void">
		<CFCONTENT type="#variables.mimeType#">
		<CFOUTPUT>#this[variables.container]()#</CFOUTPUT>
	</CFFUNCTION>
</CFCOMPONENT>
<CFSETTING enablecfoutputonly="false">